package net.falsecam.reihenaufnahme;

import java.io.IOException;

import javax.jdo.PersistenceManager;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ReportBug extends HttpServlet {

	public void doPost(HttpServletRequest req, HttpServletResponse res)
			throws ServletException, IOException {

		Bug bug = new Bug(req.getParameter("bugdescription"));
		PersistenceManager pm = PMF.get().getPersistenceManager();
		try {
			pm.makePersistent(bug);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			pm.close();
		}
		res.sendRedirect("/develop");
	}
}
